package com.ldk.base.framework.datasource.dispatcher;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;

public class DataSourceDispatcherBean implements InitializingBean, ApplicationListener<ApplicationEvent>{

	@Autowired
	private DataSourceDispatcher dispatcher;
	
	@Override
	public void onApplicationEvent(ApplicationEvent event) {
		
	}

	@Override
	public void afterPropertiesSet() throws Exception {
		if(dispatcher != null){
			dispatcher.detector();
		}
	}

}
